<div class="row">
  <div class="span3 bs-docs-sidebar ">
 	<*include file="<*$controller*>/location.tpl"*>
<script language="javascript" type="text/javascript" src="/js/DatePicker/WdatePicker.js"></script>
<style type="text/css">
.Wdate{border:0px; }
</style>
  </div>
  <div class="span9">
        <div class="span7" style="text-align:left; margin-top:10px;padding-bottom:10px;">
  
          <form action="/<*$controller*>/<*$action*>" method="get" >
		  		  <select id="jigou" name="groups"  ></select>
                  <select id="school" name="school"   ></select><br /><br />
                    开始日期：<input type="text" class="Wdate" id="start_date" onclick="WdatePicker()" style="width:110px"  name="start_date" class="Wdate" value="<*$start_date*>" autocomplete="off"/> 
                   ~  结束日期：<input type="text" class="Wdate" id="end_date" onclick="WdatePicker()" style="width:110px"  name="end_date" class="Wdate" value="<*$end_date*>" autocomplete="off"/>  
                   <button type="submit" style="margin-bottom:10px;" class="btn btn-primary btn" >查询</button>
				<*if !$schoolid*><div style="clear:both; margin-left:30px; padding-top:20px;">请选择校区！</div><*/if*>        
          </form>

  
  
  <*if $schoolid*>  
        <div id="<SPAN style='COLOR: #ff0000'>chartdiv1</SPAN>" align="center">FusionCharts. </div>  
 		    <SCRIPT LANGUAGE="Javascript" SRC="/js/FusionCharts.js"></SCRIPT>
			<script type="text/javascript">   
            	var chart = new FusionCharts("/charts/MSCombiDY2D.swf", "ChartId", "850", "550", "0", "0");  
			    chart.setDataXML("<*$xmlData*>");
				chart.setTransparent(1);
				chart.render("<SPAN style='COLOR: #ff0000'>chartdiv1</SPAN>");
            </script> 
   		</div> 
  
  		<table class="table table-condensed table-bordered table-hover span8">
        	<tr class="success"><td>日期</td><td>人均照片数</td><td>活跃度</td><td>覆盖率</td></tr>
            <*foreach from=$timearray  item=item key=key*>
            <tr><td><*$item*></td><td><*$picnum.$key*></td><td><*$huoyuedu.$key*></td><td><*$fugailv.$key*></td></tr>
            <*/foreach*>
        </table>
  <*/if*>
        </div>  
</div>
</div>
<script type="text/javascript"> 
       function   ajax_post(){ 
	    var groupsid="<*$groups*>"; 
        $.post("/<*$controller*>/groups/",{"jigouid":groupsid},function(data,statusText){ 
			 $("#jigou").append(data); 
        });  
	 } 
	  
	  $("#jigou").change(function(){
           // $("#city option:gt(0)").remove();  //清空所有城市的信息
            //$("#county option:gt(0)").remove();  //清空所有县级的信息
            var id = this.value;
			var schoolid="<*$schoolid*>";  
			  
            $.post("/<*$controller*>/schoollist/",{"id":id,"sid":schoolid},function(data,statusText){
                 $("#school").html('');
                 $("#school").append(data);
            
            });
        });
		
		$("#school").change(function(){
           // $("#city option:gt(0)").remove();  //清空所有城市的信息
            //$("#county option:gt(0)").remove();  //清空所有县级的信息
            var sid = this.value; 
            $.post("/<*$controller*>/classlist/",{"id":sid},function(data,statusText){
				 
                 $("#class1").html('');
                 $("#class1").append(data);
            
            });
        });
		
	
	 window.onload=function(){
	    ajax_post(); 
	 if( '<*$groups*>'+0 != 0 ){ 
	        
			var id = '<*$groups*>'; 
			var sid = '<*$schoolid*>';  
			 
			$.post("/<*$controller*>/schoollist/",{"id":id,"sid":sid},function(data,statusText){
				 $("#school").html('');
				 $("#school").append(data); 
				});
	    } 
          
	 if('<*$schoolid*>'+0 != 0){   
		   var id = '<*$schoolid*>'; 
		   var cid='<*$classid*>';
			$.post("/<*$controller*>/classlist/",{"id":id,"cid":cid},function(data,statusText){ 
				 $("#class1").html('');
				 $("#class1").append(data); 
				}); 
		   
	 }/* */

 } 
	
</script> 
